def addBinary(a: str, b: str) -> str:
    if len(a) >= len(b):
        big,small = a,b
    else:
        big,small = b,a

    result = ""
    get_in = 0
    for i in range(1,len(small)+1):
        single_add = int(small[-i])+int(big[-i])+get_in
        if single_add >= 2:
            get_in = 1
            single_add = single_add - 2
            result += str(single_add)
        else:
            get_in = 0
            result += str(single_add)
    
    for i in range(len(small), len(big)):
        single_add = int(big[-i-1]) + int(get_in)
        if single_add >= 2:
            get_in = 1
            single_add = single_add - 2
            result += str(single_add)
        else:
            get_in = 0
            result += str(single_add)
    
    if get_in == 1:
        result += str(get_in)

    result = result[::-1] 
    return result

print(addBinary("1011","11"))